// Initialise the time limit and handle ending the mission once the limit is reached. (Should only be run on server)
// This script should only ever be run if the time limit was enabled in the mission parameters.
if ((paramsArray select 2) == 0) exitWith {};

// Let's start the timer.
estimatedTimeLeft (paramsArray select 3);

// Now we wait until the time has run out
waitUntil {(estimatedEndServerTime - serverTime) <= 0};

// Once time has run out, we want to display an OPFOR victory 
[["West_Loss_Time", false, true],"BIS_fnc_endMission", WEST, true] spawn BIS_fnc_MP;
[["East_Victory_Time", true, true],"BIS_fnc_endMission", EAST, true] spawn BIS_fnc_MP;